package com.wonder.app.service;

import com.wonder.app.domain.*;


import java.util.List;
import java.util.Map;

public interface SyncKingdeeOrderService {

    /**
     * 传金蝶采购入库单
     * @param userName
     * @param purIn
     * @param detailList
     * @throws Exception
     */
    void syncPurInOrder(Long user_id,String userName, PurIn purIn, List<PurInDetail> detailList,String customAuditDateTime) throws Exception;

    /**
     * 其他入库单传金蝶
     * @param user_id
     * @param userName
     * @param stkOtherIn
     * @param detailList
     * @throws Exception
     */
    void syncOtherIn(Long user_id, String userName, StkOtherIn stkOtherIn, List<StkOtherInDeatil> detailList) throws Exception;

    /**
     * 其他出库单传金蝶
     * @param user_id
     * @param userName
     * @param stkotherout
     * @param detailList
     * @throws Exception
     */
    void syncOtherOUT(Long user_id, String userName, Stkotherout stkotherout, List<StkOtheroutDetail> detailList) throws Exception;

    /**
     * 采购退料单传金蝶
     * @param user_id
     * @param userName
     * @param purReturn
     * @param detailList
     * @throws Exception
     */
    void syncPurReturn(Long user_id, String userName, PurReturn purReturn, List<PurReturnDetail> detailList) throws Exception;

    /**
     * 销售订单金蝶
     * @param saleOrder
     * @param detailList
     * @throws Exception
     */
    void syncSaleOrder(SaleOrder saleOrder, List<SaleOrderDetail> detailList, Map<String,Object> materialToMap, Map<String,Object> customerMap,Map<String,Object> currencyMap,Long user_id) throws Exception;
    /**
     *青岛销售订单金蝶
     * @param qingSaleOrder
     * @param qingSaleOrderDetailList
     * @throws Exception
     */
    void syncQingSaleOrder(QingSaleOrder qingSaleOrder, List<QingSaleOrderDetail> qingSaleOrderDetailList, Map<String,Object> materialToMap, Map<String,Object> acccusMap, Map<String,Object> customerMap,Map<String,Object> currencyMap,Long user_id) throws Exception;
    /**
     *青岛销售订单变更金蝶
     * @param qingSaleOrder
     * @param saleqingOrderDetailList
     * @throws Exception
     */
    void syncqingSaleUpdateOrder(QingSaleOrder qingSaleOrder, List<QingSaleOrderDetail> saleqingOrderDetailList,Long user_id) throws Exception;

    /**
     * 青岛金蝶生产订单
     * @param qingSfcOperp
     * @param qingsfcOperpDetailList
     */
    void syncQingPrdOrder(QingSfcOperp qingSfcOperp, List<QingSfcOperpDetail> qingsfcOperpDetailList,Long user_id) throws Exception;

    /**
     * 青岛金蝶生产订单变更
     * @param qingSfcOperp
     * @param qingsfcOperpDetailList
     */
    void syncQingPrdOrderUpdate(QingSfcOperp qingSfcOperp, List<QingSfcOperpDetail> qingsfcOperpDetailList, Long user_id,Map<String,Object> countMap) throws Exception;
    /**
     * 青岛金蝶生产入库单
     * @param qingSfcInstock
     * @param qingSfcInstockDetailList
     */
    void syncQingPrdInstock(QingSfcInstock qingSfcInstock, List<QingSfcInstockDetail> qingSfcInstockDetailList,Long user_id) throws Exception;
    /**
     * 青岛金蝶采购入库单
     * @param qingPurIn
     * @param qingPurInDetailList
     */
    void syncQingPurIn(QingPurIn qingPurIn, List<QingPurInDetail> qingPurInDetailList,Long user_id) throws Exception;
    /**
     * 销售出库单传金蝶
     * @param saleOutStock
     * @param saleOutDetailList
     * @throws Exception
     */
    void syncSaleOutOrder(SaleOutStock saleOutStock, List<SaleOutStockDetail> saleOutDetailList,Long user_id) throws Exception;
    /**
     * 异常处理单
     * @param list
     * @throws Exception
     */
    void syncAbnormal(Abnormal list) throws Exception;

    void unAuditPurReceive(Long user_id, String userName, PurIn purIn, List<PurInDetail> purInDetailList) throws Exception;

    void syncSaleUpdateOrder(SaleOrder saleOrder, List<SaleOrderDetail> saleOrderDetailList) throws Exception;

    /**
     * 传金蝶生产订单
     * @param sfcOperp
     * @param sfcOperpDetailList
     */
    void syncPrdOrder(SfcOperp sfcOperp, List<SfcOperpDetail> sfcOperpDetailList,Long user_id) throws Exception;


    /**
     * 传金蝶生产领料单
     * @param prdPick
     * @param detailList
     * @throws Exception
     */
    void syncPrdPick(Long userId, PrdPick prdPick , List<PickDetail> detailList) throws Exception;

    void syncPrdOrderUpdate(SfcOperp sfcOperp, List<SfcOperpDetail> sfcOperpDetailList, Long user_id,Map<String,Object> countMap) throws Exception;

    void syncPrdOrderMold(Long user_id,String userName, MoldInspect moldInspect) throws Exception;

    void syncAllocation(Long userId, PrdPick pick, List<PickDetail> detailList)throws Exception;

    /**
     * 传金蝶生产汇报单
     * @param user_id
     * @param sfcOptrpt
     * @param sfcOptrptDetailList
     * @throws Exception
     */
    void syncPrdReport(Long user_id, SfcOptrpt sfcOptrpt, List<SfcOptrptDetail> sfcOptrptDetailList)throws Exception;


    /**
     * 包装间传汇报单
     * @param user_id
     * @param sfcOptrptPackage
     * @param sfcOptrptDetailList
     * @throws Exception
     */
    void syncPrdReportBao(Long user_id, SfcOptrptPackage sfcOptrptPackage, List<SfcOptrptDetail> sfcOptrptDetailList)throws Exception;

    /**
     * 传金蝶生产入库单
     * @param user_id
     * @param prdInstock
     * @param detailList
     */
    void syncPrdInsStock(Long user_id, PrdInstock prdInstock, List<PrdInstockDetail> detailList)throws Exception;


    /**
     * 铸造车间
     * @param user_id
     * @param prdInstock
     * @param detailList
     */
    void syncPrdInsStockSM(Long user_id, PrdInstock prdInstock, List<PrdInstockDetail> detailList)throws Exception;

    /**
     * 包装车间
     * @param user_id
     * @param prdInstock
     * @param detailList
     */
    void syncPrdInsStockPackage(Long user_id, PrdInstock prdInstock, List<PrdInstockDetail> detailList,SfcOptrptPackage sfcOptrptPackage)throws Exception;

    /**
     * 机加车间传金蝶工序汇报单
     * @param user_id
     * @param proplanno
     * @throws Exception
     */
    void syncPrdReportJiJia(Long user_id, String proplanno,String trayNo) throws Exception;

    /**
     * 传金蝶退料单
     * @param user_id
     * @param prdInstock
     * @param prdInstockDetailList
     * @throws Exception
     */
    void syncPrdReturn(Long user_id, PrdInstock prdInstock, List<PrdInstockDetail> prdInstockDetailList,Double failCount)throws Exception;


    /**
     * 传金蝶退料单(包材)
     * @param user_id
     * @param prdReturn
     * @param detailList
     * @throws Exception
     */
    void syncPrdReturnBao(Long user_id, PrdReturn prdReturn, List<PrdReturnDetail> detailList,String kingdeeNo,SfcOptrptPackage sfcOptrptPackage)throws Exception;

    /**
     * 机加报废数量传入库(回材库)
     * @param user_id
     * @param prdInstock
     * @param prdInstockDetailList
     * @param failCount
     * @throws Exception
     */
    void syncPrdInsStockHuiCai(Long user_id, PrdInstock prdInstock, List<PrdInstockDetail> prdInstockDetailList, double failCount)throws Exception;

    String syncprdfeed(Long user_id, PrdFeed feedList,List<PrdFeedDetail> detailList,SfcOptrptPackage sfcOptrptPackage) throws Exception;

    Map<String, Object> getInventoryByNo(Long user_id, String materialNo)throws Exception;

    void syncTransfer(Long user_id, StkTransfer stkTransfer, List<StkTransferDetail> stkTransferDetailList)throws Exception;

    void syncTransferAllocation(Long user_id, StkTransfer stkTransfer, List<StkTransferDetail> stkTransferDetailList)throws Exception;

    void syncPrdPickBao(Long user_id, PrdPick pick, List<PickDetail> pickDetailList,SfcOptrptPackage sfcOptrptPackage) throws Exception;

    Map<String, Object> getInventoryByItem(Long user_id, Map<String, Object> map) throws Exception;

    void syncPrdPickByFeed(Long userId, PrdFeed prdFeed, List<PrdFeedDetail> feedDetailList)throws Exception;

    void syncAllocationByFeed(Long userId, PrdFeed prdFeed, List<PrdFeedDetail> feedDetailList)throws Exception;

    void syncPurInOrderByPda(Long user_id, String userName, Map<String, Object> map)throws Exception;

    void syncPrdInsStockHuiCaiSM(Long user_id, PrdInstock prdInstock, List<PrdInstockDetail> detailList, Double failCount) throws Exception;
}
